package com.wyt.cloud.utils.exception;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException {

    private Integer code;

    public BusinessException() {
    }

    /**
     * 把参数传递给Throwable的带String参数的构造方法
     *
     * @param message
     */
    public BusinessException(String message) {
        super(message);
    }

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }
}
